package com.xx.cloud.pay.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonInclude;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

@TableName("user")
@Data
@Accessors(chain = true)

//空字段不反回
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class UserPayAddress {

    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    @NotNull(message = "名称不能为空")
    @NotBlank(message = "名称不能为空")
    private String name;
    private String address;
    private String phone;


    @TableField(fill = FieldFill.INSERT)
    private Date createTime;


    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * 不是数据库字段
     */
    @TableField(exist = false)
    private String sex;
}
